package com.esl.service.admin.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import com.esl.dao.admin.ProjectDao;
import com.esl.dto.admin.PageInfo_Dto;
import com.esl.model.admin.Project;
import com.esl.service.admin.ProjectManager;

@Service("projectManager")
public class ProjectManagerImpl implements ProjectManager {
	private ProjectDao projectDao;

	@Override
	public void add(Project project) {
		projectDao.save(project);
	}

	@Override
	public void delect(Project project) {
		// TODO Auto-generated method stub

	}

	@Override
	public void modify(Project project) {
		projectDao.saveOrUpdate(project);
	}

	@Override
	public void output() {
		// TODO Auto-generated method stub

	}

	@Override
	public PageInfo_Dto load(Class<Project> clazz, int pageNow, int pageSize,
			String hql, String orderBy) {
		return projectDao
				.findByPageInfo(clazz, pageNow, pageSize, hql, orderBy);
	}

	/*
	 * public ProjectDao getProjectDao() { return projectDao; }
	 */

	/*---------------------------------*/
	@Resource
	public void setProjectDao(ProjectDao projectDao) {
		this.projectDao = projectDao;
	}

}
